package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the PERMISO_USR database table.
 * 
 */
@Entity
@Table(name="PERMISO_USR")
public class PermisoUsr implements Serializable {
	private static final long serialVersionUID = 1L;
	private PermisoUsrPK id;
	private String estado;
	private String fgSyncTam;
	private Date tsCrea;
	private Date tsUltModif;
	private String usrCrea;
	private String usrUltModif;
	private TmPermisoExt tmPermisoExt;
	private Cuenta cuenta;

    public PermisoUsr() {
    }


	@EmbeddedId
	public PermisoUsrPK getId() {
		return this.id;
	}

	public void setId(PermisoUsrPK id) {
		this.id = id;
	}
	

	@Column(nullable=false, length=20)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(name="FG_SYNC_TAM", nullable=false, length=1)
	public String getFgSyncTam() {
		return this.fgSyncTam;
	}

	public void setFgSyncTam(String fgSyncTam) {
		this.fgSyncTam = fgSyncTam;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA", nullable=false)
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_MODIF", nullable=false)
	public Date getTsUltModif() {
		return this.tsUltModif;
	}

	public void setTsUltModif(Date tsUltModif) {
		this.tsUltModif = tsUltModif;
	}


	@Column(name="USR_CREA", nullable=false, length=15)
	public String getUsrCrea() {
		return this.usrCrea;
	}

	public void setUsrCrea(String usrCrea) {
		this.usrCrea = usrCrea;
	}


	@Column(name="USR_ULT_MODIF", nullable=false, length=15)
	public String getUsrUltModif() {
		return this.usrUltModif;
	}

	public void setUsrUltModif(String usrUltModif) {
		this.usrUltModif = usrUltModif;
	}


	//bi-directional many-to-one association to TmPermisoExt
    @ManyToOne
	@JoinColumn(name="PERMISO_ID", nullable=false, insertable=false, updatable=false)
	public TmPermisoExt getTmPermisoExt() {
		return this.tmPermisoExt;
	}

	public void setTmPermisoExt(TmPermisoExt tmPermisoExt) {
		this.tmPermisoExt = tmPermisoExt;
	}
	

	//bi-directional many-to-one association to Cuenta
    @ManyToOne
	@JoinColumn(name="CUENTA_ID", nullable=false, insertable=false, updatable=false)
	public Cuenta getCuenta() {
		return this.cuenta;
	}

	public void setCuenta(Cuenta cuenta) {
		this.cuenta = cuenta;
	}
	
}